package com.jrx.anytxn.investor.bean;

import com.jrx.anytxn.common.annotation.MethodType;
import com.jrx.anytxn.common.constant.CommonContants;
import com.jrx.anytxn.investor.entity.*;
import org.apache.commons.collections.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * 利息累计job processor返回给writer的响应
 *
 * @author liuyang
 * @date 2020-05-26
 */
public class InvestorIntrAccuBean {

    private List<AmInterestAccrualInvestorInfo> interestAccrualInfoList = new ArrayList<>();

    private List<AmAccountMainInvestorInfo> accountMainInfoList = new ArrayList<>();

    private List<TlGlInterfaceInvestorInfo> tlGlInterfaceInfoList = new ArrayList<>();

    private List<TlInvestorInterestAccrualLog> tlInterestAccrualLogList = new ArrayList<>();

    private AmLoanAccountInvestorInfo amLoanAccountInfo;

    @MethodType(CommonContants.METHOD_TYPE_UPDATE)
    public List<AmInterestAccrualInvestorInfo> getInterestAccrualInfoList() {
        return interestAccrualInfoList;
    }

    @MethodType(CommonContants.METHOD_TYPE_SAVE)
    public List<AmAccountMainInvestorInfo> getAccountMainInfoList() {
        return accountMainInfoList;
    }

    @MethodType(CommonContants.METHOD_TYPE_SAVE)
    public List<TlGlInterfaceInvestorInfo> getTlGlInterfaceInfoList() {
        return tlGlInterfaceInfoList;
    }

    @MethodType(CommonContants.METHOD_TYPE_SAVE)
    public List<TlInvestorInterestAccrualLog> getTlInterestAccrualLogList() {
        return tlInterestAccrualLogList;
    }

    @MethodType(CommonContants.METHOD_TYPE_UPDATE)
    public AmLoanAccountInvestorInfo getAmLoanAccountInfo() {
        return amLoanAccountInfo;
    }

    public void setInterestAccrualInfoList(List<AmInterestAccrualInvestorInfo> interestAccrualInfoList) {
        this.interestAccrualInfoList = interestAccrualInfoList;
    }

    public void addInterestAccrualInfo(AmInterestAccrualInvestorInfo amInterestAccrualInfo){
        this.interestAccrualInfoList.add(amInterestAccrualInfo);
    }

    public void setAccountMainInfoList(List<AmAccountMainInvestorInfo> accountMainInfoList) {
        this.accountMainInfoList = accountMainInfoList;
    }

    public void addAccountMainInfo(AmAccountMainInvestorInfo amAccountMainInfo){
        this.accountMainInfoList.add(amAccountMainInfo);
    }

    public void setTlGlInterfaceInfoList(List<TlGlInterfaceInvestorInfo> tlGlInterfaceInfoList) {
        this.tlGlInterfaceInfoList = tlGlInterfaceInfoList;
    }

    public void addTlGlInterfaceInfo(TlGlInterfaceInvestorInfo tlGlInterfaceInfo){
        if(null != tlGlInterfaceInfo) {
            this.tlGlInterfaceInfoList.add(tlGlInterfaceInfo);
        }
    }

    public void addTlGlInterfaceInfoList(List<TlGlInterfaceInvestorInfo> tlGlInterfaceInfoList){
        if(CollectionUtils.isNotEmpty(tlGlInterfaceInfoList)) {
            this.tlGlInterfaceInfoList.addAll(tlGlInterfaceInfoList);
        }
    }

    public void setTlInterestAccrualLogList(List<TlInvestorInterestAccrualLog> tlInterestAccrualLogList) {
        this.tlInterestAccrualLogList = tlInterestAccrualLogList;
    }

    public void addTlInterestAccrualLog(TlInvestorInterestAccrualLog tlInterestAccrualLog) {
        this.tlInterestAccrualLogList.add(tlInterestAccrualLog);
    }

    public void setAmLoanAccountInfo(AmLoanAccountInvestorInfo amLoanAccountInfo) {
        this.amLoanAccountInfo = amLoanAccountInfo;
    }
}
